/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */
import React, { Component } from 'react';
import {
    Platform,
    StyleSheet,
    Text,
    View,
    Button,
    Alert
} from 'react-native';

export default class HomePage extends Component {
    constructor(){
        super();
        this.state=({
            remove:false
        })
    }
    render() {
        const {navigation} = this.props;
        return (
            <View style={styles.container}>
                <Text>欢迎来到德莱联盟</Text>
                <Button
                    title="滚去P1"
                    onPress={()=>{
                        navigation.navigate('Page1',{name: '动态的'})
                    }}
                />
                <Button
                    title="滚去P2"
                    onPress={()=>{
                        navigation.navigate('Page2')
                    }}
                />
                <Button
                    title="滚去P3"
                    onPress={()=>{
                        navigation.navigate('Page3',{title: '我是你爸爸'})
                    }}
                />
                <View style={{marginTop:30}}>
                    <Button
                        title="主页入口"
                        onPress={()=>{
                            navigation.navigate('TabNav')
                        }}
                    />
                </View>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#F5FCFF',
        marginTop:50
    },
    welcome: {
        fontSize: 20,
        textAlign: 'center',
        margin: 10,
    },
    instructions: {
        textAlign: 'center',
        color: '#333333',
        marginBottom: 5,
    },
});
